import {configureStore,combineReducers} from "@reduxjs/toolkit"
import {persistStore,persistReducer} from "redux-persist"
import storage from "redux-persist/lib/storage"
import Num from "./Num";
const rootRedecer = combineReducers({
    Num:Num.reducer,
});
const persistConfig = {
    key:'root',
    storage,
}
const persistedReducer = persistReducer(persistConfig,rootRedecer);
export const store = configureStore({
    reducer:persistedReducer,
    middleware:(getDefaultMiddleware)=>
        getDefaultMiddleware({
            serializableCheck:false,
        }),
});
export const persistor = persistStore(store)